<template>
    <div >
      <!-- 题目框 -->
        填空题
        <el-input class="inputboxClass"
            placeholder="编辑题目"
            v-model="wholeTitles.title.content"
            clearable>
        </el-input>
        <br/>
      

            <!-- 是否必做 -->
            是否必做:
            <el-select v-model="wholeTitles.title.must" placeholder="请选择">
                <el-option
                v-for="item in mustdo"
                :key="item.value"
                :label="item.label"
                :value="item.value">
                </el-option>
            </el-select>   <br/>

          <!-- 答题框 -->
          回答
        <el-input
            class="inputboxClass"
            placeholder="请输入内容"
            v-model="wholeTitles.choices[0].content"
            clearable
            :disabled=true>
        </el-input><br/>
        <button @click="log()" v-show="false">打印</button>
    </div>
    
</template>

<script>
  export default {
    data () {
      return {
            mustdo:[{
                value: 1,                                   //1:必做
                label: '必做'                               //2：非比做
            },{
                value: 2,                               
                label:'非比做'
            }], 

            wholeTitles:{
                title:{
                    type:'',
                    must: 1,
                    content:'',
                    titNum:'',
                },
                choices: [                       //选项的信息  
                    {
                    choiceNum: 1,                                  //choiceNum表示选项号 
                    content: ''                             //表示内容
                    }]
            },        

      };
    },
    methods: {
        log(){
            console.log(this.wholeTitles.choices);
            console.log(this.wholeTitles.title);
        }
    },
    props: {
        temp:{}
    },
    created () {
        this.wholeTitles=this.temp;
    }
  };
</script>
<style  scoped>
.inputboxClass{
    width: 300px;

}


</style>
